{* Smarty *}
{include file="page_header.tpl" page="admin"}
{foreach from=$total item=i}
<table style="border-bottom:1px dashed black">
<tbody>
	<tr>
	 <th>id</th>
	 <td>{$i.id}</td> 
	</tr>
	<tr>
	 <th>remove</th>
	 <td><a href="lib/model_broker.php?model=problems&type=delete&id={$i.id}">DEL</a></td>
	</tr>

{if $i.state == 0}
	<tr>
	 <th>Do fix</th>
	 <td><a href="lib/model_broker.php?model=problems&type=problem_state&state=1&id={$i.id}">FIX!</a></td>
	</tr>
	<tr>
	 <th>Do Partial fix</th>
	 <td><a href="lib/model_broker.php?model=problems&type=problem_state&state=2&id={$i.id}">Partial FIX!</a></td>
	</tr>
{elseif $i.state == 1 || $i.state == 2}
	<tr>
	 <th>Do unfix</th>
	 <td><a href="lib/model_broker.php?model=problems&type=problem_state&state=0&id={$i.id}">UNFIX!</a></td>
	</tr>
{/if}
	<tr>
	 <th>category</th>
	 <td>{$i.category}</td> 
	</tr>
	<tr>
	 <th>Reporter</th>
	 <td>{$i.reporter}</td> 
	</tr>
	<tr>
	 <th>email</th>
	 <td>{$i.email}</td> 
	</tr>
	<tr>
	 <th>service type</th>
	 <td>{$i.service_type}</td> 
	</tr>
	<tr>
	 <th>address</th>
	 <td>{$i.address1} {$i.address2} {$i.address3}</td> 
	</tr>
	<tr>
	 <th>subject</th>
	 <td>{$i.subject}</td> 
	</tr>
	<tr>
	 <th>details</th>
	 <td>
	<p>{$i.details}<br/></p>
	{if $i.img}<img alt="$i.subject" src="../photos/{$i.id}" />{/if}
	 </td> 
	</tr>
	<tr>
	 <th>Reported time</th>
	 <td>{$i.created_time}</td> 
	</tr>
</tbody>
</table>
{/foreach}
{include file="page_footer.tpl"}
